package com.lapian.designmode.flyweight.test.test_f2;

import com.lapian.designmode.flyweight.my.User;

/**
 * 创建日期：2022/6/8 0008 17:55
 *
 * @author tony.sun
 * 类说明：
 */
public class Client {
    public static void main(String[] args) {
        FactoryF f=new FactoryF();
        AbstractRoleF2 concreteRoleF2=f.getCategory("敏攻系");
        AbstractRoleF2 control = f.getCategory("控制系");
        AbstractRoleF2 power = f.getCategory("强攻系");
        power.use(new User("戴沐白"));
        control.use(new User("唐三"));
        concreteRoleF2.use(new User("小舞"));
        int size=f.getPoolSize();
        System.out.println(size);

    }
}
